﻿using System;


namespace TopBuilds.Restaurant.Data
{
    public class SalePromotion
    {
        #region 属性
        private int _id;
        private string _name;
        private DateTime _startTime;
        private DateTime _endTime;
        private int _discount;
        #endregion

        #region 构造
        public SalePromotion()
        {
            _name              = null;
            _startTime         = DateTime.Now;
            _endTime           = DateTime.Now;
            _discount          = 0;
        }

        public SalePromotion(string name)
        {
            _name              = name;
            _startTime         = DateTime.Now;
            _endTime           = DateTime.Now;
            _discount          = 0;
        }

        public SalePromotion(string name, DateTime startTime)
        {
            _name              = name;
            _startTime         = startTime;
            _endTime           = DateTime.Now;
            _discount          = 0;
        }

        public SalePromotion(string name, DateTime startTime, DateTime endTime)
        {
            _name              = name;
            _startTime         = startTime;
            _endTime           = endTime;
            _discount          = 0;
        }

        public SalePromotion(string name, DateTime startTime, DateTime endTime,int discount)
        {
            _name              = name;
            _startTime         = startTime;
            _endTime           = endTime;
            _discount          = discount;
        }
        #endregion

        public int Id
        {
            get { return _id; }
            set { _id = value; }
        }

        public string Name
        {
            get { return _name; }
            set { _name = value; }
        }

        public DateTime StartTime
        {
            get { return _startTime; }
            set { _startTime = value; }
        }

        public DateTime EndTime
        {
            get { return _endTime; }
            set { _endTime = value; }
        }

        public int Discount
        {
            get { return _discount; }
            set { _discount = value; }
        }
        public override string ToString()
        {
            return Name;
        }
    }
}
